<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>:checked</title>
        <link type="text/css" rel="stylesheet" href='../../css/c1.css'>
        <style>
            *{
                margin: 0 auto;
                padding:0 5px;
            }
            p{
                padding: 5px 10px;
            }
        </style>
        <script src="../../work/jquery-1.12.4.min.js"></script>
        <script>
            jQuery(function ($) {
                $("#btn1",".code").click(function () {
                       $("input:checked").prop({checked:false});
                });

            });
        </script>
    </head>
    <body>
    <div class="title">:checked</div>
    <p>匹配所有选中的被选中元素(复选框、单选框等，不包括select中的option)。</p>
    <div class="title">代码示例</div>
    <div class="code">
                        <pre>
                            &lt;script&gt;
                                jQuery(function ($) {
                                    $("#btn1",).click(function () {
                                        $(<span>"input:checked"</span>).prop({checked:false});
                                        //<span>查找所有选中的复选框元素</span>
                                    });
                                });
                           &lt;/script&gt;
        &lt;form&gt;
            &lt;input type="checkbox" name="newsletter" checked="checked" value="Daily" /&gt;&lt;br/&gt;&lt;br/&gt;
            &lt;input type="checkbox" name="newsletter" value="Weekly" /&gt;&lt;br/&gt;&lt;br/&gt;
            &lt;input type="checkbox" name="newsletter" checked="checked" value="Monthly" /&gt;/&gt;

        &lt;/form&gt;
                          &lt;button id="btn1" style="margin: 10px;"&gt;点击查看效果&lt;/button&gt;
                        </pre>
    </div>
    <div class="title">代码示例</div>
    <div class="code">
        <form>
                <input type="checkbox" name="newsletter" checked="checked" value="Daily" />
                <input type="checkbox" name="newsletter" value="Weekly" />
                <input type="checkbox" name="newsletter" checked="checked" value="Monthly" />
        </form>
        <button id="btn1" style="margin: 10px;width: 120px;height:50px">点击查看效果</button>
    </div>
    </body>
</html>